#include <windows.h>
#include "CChar.h"
#include "CKneelAnimationPacket.h"

CKneelAnimationPacket::CKneelAnimationPacket(CChar * schar, unsigned char animation, unsigned short effect, unsigned char param) {

	this->type = 0x30;
	this->size = 0x08;

	memset(this->data, 0, sizeof(data));

	unsigned long charID = schar->getId();
	unsigned short targID = schar->getTargId();
	memcpy(data+0x04-0x04, &charID, 4);
	memcpy(data+0x08-0x04, &targID, 2);
	memcpy(data+0x0A-0x04, &effect, 2);
	data[0x0C-0x04] = param;
	data[0x0D-0x04] = animation;

}

CKneelAnimationPacket::~CKneelAnimationPacket() {

}
